package edu.mit.compilers.lowercode.code;

public class ThrowRuntimeErrorCode extends ThreeAddressCode {
    private final int ec;
    public ThrowRuntimeErrorCode(int ec) {
        this.ec = ec;
    }

    public int getEc() {
        return ec;
    }

    @Override
    protected String getStringFroShow(String prefix) {
        return prefix + "throw runtime error [" + ec + "]";
    }

    @Override
    public <T> T accept(ThreadAddressCodeVistor<T> visitor) {
        return visitor.visit(this);
    }
}
